/*
 * Copyright (c) 1994-2017, Joyoung Stock CO.LTD.
 * The FWJR Project.
 * All Rights Reserved.
 */

package com.jz.jd.rest.business;

import com.jz.jd.rest.constant.JDConstant;
import com.jz.jd.rest.response.BannerResponse;
import com.jz.jd.rest.response.FactoryResponse;
import com.jz.jd.rest.response.HotGoodsResponse;
import com.jz.jd.rest.response.OrderListResponse;
import com.jz.jd.rest.response.OrderResponse;
import com.jz.jd.rest.response.ShoppingCarListResponse;
import com.jz.jd.rest.response.StyleResponse;
import com.jz.jd.rest.response.VIPBalanceResponse;
import com.jz.jd.rest.response.VipGradeResponse;
import com.jz.jd.rest.response.VipInfoResponse;
import com.jz.jd.rest.response.AddressResponse;
import com.jz.jd.rest.response.AreaResponse;
import com.jz.jd.rest.response.BankCardResponse;
import com.jz.jd.rest.response.BankResponse;
import com.jz.jd.rest.response.BaseResponse;
import com.jz.jd.rest.response.ConfigResponse;
import com.jz.jd.rest.response.EarningResponse;
import com.jz.jd.rest.response.ExpressPriceResponse;
import com.jz.jd.rest.response.ExpressResponse;
import com.jz.jd.rest.response.GoodsDetailResponse;
import com.jz.jd.rest.response.GoodsTabResponse;
import com.jz.jd.rest.response.KeFuResponse;
import com.jz.jd.rest.response.LoginResponse;
import com.jz.jd.rest.response.MemberResponse;
import com.jz.jd.rest.response.MessageNotifyResponse;
import com.jz.jd.rest.response.RedResponse;
import com.jz.jd.rest.response.ShouyiResponse;
import com.jz.jd.rest.response.VIPDetailResponse;
import com.jz.jd.rest.response.WXTokenResponse;
import com.jz.jd.rest.response.WeChatPayResponse;

import io.reactivex.Observable;
import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;

public interface IRestAPI {
    @POST(JDConstant.HOST + JDConstant.BASE_URL + JDConstant.METHOD_HOT_BANNER)
    Observable<BannerResponse> getBanner(@Body RequestBody Body);

    @POST(JDConstant.HOST + JDConstant.BASE_URL + JDConstant.METHOD_HOT_GOODS)
    Observable<HotGoodsResponse> getHotGoods(@Body RequestBody Body);

    @POST(JDConstant.HOST + JDConstant.BASE_URL + JDConstant.METHOD_RED_GOODS)
    Observable<RedResponse> getRedGoods(@Body RequestBody Body);

    @POST(JDConstant.HOST + JDConstant.BASE_URL + JDConstant.METHOD_GOODS_DETAIL)
    Observable<GoodsDetailResponse> getGoodsDetail(@Body RequestBody Body);

    @POST(JDConstant.HOST + JDConstant.BASE_URL + JDConstant.METHOD_SHOPPING_CAR_LIST)
    Observable<ShoppingCarListResponse> getShoppingCarList(@Body RequestBody Body);

    @POST(JDConstant.HOST + JDConstant.BASE_URL + JDConstant.METHOD_GET_ALL_SIZE)
    Observable<StyleResponse> getAllSize(@Body RequestBody Body);

    @POST(JDConstant.HOST + JDConstant.BASE_URL + JDConstant.METHOD_QUERY_GOODS_ID)
    Observable<StyleResponse> queryGoodsId(@Body RequestBody Body);

    @POST(JDConstant.HOST + JDConstant.BASE_URL + JDConstant.METHOD_ADD_SHOPPING_CAR)
    Observable<BaseResponse> addShoppingCar(@Body RequestBody Body);

    @POST(JDConstant.HOST + JDConstant.BASE_URL + JDConstant.METHOD_GET_ALL_ORDER)
    Observable<OrderListResponse> getAllOrderList(@Body RequestBody Body);

    @POST(JDConstant.HOST + JDConstant.BASE_URL + JDConstant.METHOD_DO_ORDER)
    Observable<OrderResponse> doOrder(@Body RequestBody Body);

    @POST(JDConstant.HOST + JDConstant.BASE_URL + JDConstant.METHOD_GET_DEFAULT_ADDRESS)
    Observable<AddressResponse> getDefaultAddress(@Body RequestBody Body);

    @POST(JDConstant.HOST + JDConstant.BASE_URL + JDConstant.METHOD_GET_ALL_ADDRESS)
    Observable<AddressResponse> getAllAddress(@Body RequestBody Body);

    @POST(JDConstant.HOST + JDConstant.BASE_URL + JDConstant.METHOD_SET_DEFAULT_ADDRESS)
    Observable<BaseResponse> setDefaultAddress(@Body RequestBody Body);

    @POST(JDConstant.HOST + JDConstant.BASE_URL + JDConstant.METHOD_CONFIRM_ORDER)
    Observable<BaseResponse> confirmOrder(@Body RequestBody Body);

    @POST(JDConstant.HOST + JDConstant.BASE_URL + JDConstant.METHOD_UPLOAD_PAYMENT_FILE)
    Observable<BaseResponse> uploadFile(@Body RequestBody Body);

    @POST(JDConstant.HOST + JDConstant.BASE_URL + JDConstant.METHOD_GET_EXPRESS_INFO)
    Observable<ExpressResponse> getExpressInfo(@Body RequestBody Body);

    @POST(JDConstant.HOST + JDConstant.BASE_URL + JDConstant.METHOD_GET_PROVINCE)
    Observable<AreaResponse> getProvince(@Body RequestBody Body);

    @POST(JDConstant.HOST + JDConstant.BASE_URL + JDConstant.METHOD_GET_CITY)
    Observable<AreaResponse> getCity(@Body RequestBody Body);

    @POST(JDConstant.HOST + JDConstant.BASE_URL + JDConstant.METHOD_GET_AREA)
    Observable<AreaResponse> getArea(@Body RequestBody Body);

    @POST(JDConstant.HOST + JDConstant.BASE_URL + JDConstant.METHOD_ADD_ADDRESS)
    Observable<BaseResponse> addAddress(@Body RequestBody Body);

    @POST(JDConstant.HOST + JDConstant.BASE_URL + JDConstant.METHOD_UPDATE_ADDRESS)
    Observable<BaseResponse> updateAddress(@Body RequestBody Body);

    @POST(JDConstant.HOST + JDConstant.BASE_URL + JDConstant.METHOD_DEL_ADDRESS)
    Observable<BaseResponse> delAddress(@Body RequestBody Body);

    @POST(JDConstant.HOST + JDConstant.BASE_URL + JDConstant.METHOD_DEL_SHOPPINGBAG)
    Observable<BaseResponse> delShoppingBag(@Body RequestBody Body);

    @POST(JDConstant.HOST + JDConstant.BASE_URL + JDConstant.METHOD_GET_YZM)
    Observable<BaseResponse> getYZM(@Body RequestBody Body);

    @POST(JDConstant.HOST + JDConstant.BASE_URL + JDConstant.METHOD_LOGIN)
    Observable<LoginResponse> login(@Body RequestBody Body);

    @POST(JDConstant.HOST + JDConstant.BASE_URL + JDConstant.METHOD_PHONE_LOGIN)
    Observable<LoginResponse> phoneLogin(@Body RequestBody Body);

    @POST(JDConstant.HOST + JDConstant.BASE_URL + JDConstant.METHOD_GET_VIP_INFO)
    Observable<VipInfoResponse> getVIPInfo(@Body RequestBody Body);

    @POST(JDConstant.HOST + JDConstant.BASE_URL + JDConstant.METHOD_ACCESS_VIP)
    Observable<BaseResponse> uploadVipFile(@Body RequestBody Body);

    @POST(JDConstant.HOST + JDConstant.BASE_URL + JDConstant.METHOD_UPDATE_SHOPPINGBAG)
    Observable<BaseResponse> updateShoppingBag(@Body RequestBody Body);

    @POST(JDConstant.HOST + JDConstant.BASE_URL + JDConstant.METHOD_GET_FACTORY)
    Observable<FactoryResponse> getFactory(@Body RequestBody Body);

    @POST(JDConstant.HOST + JDConstant.BASE_URL + JDConstant.METHOD_GET_VIP_DETAIL)
    Observable<VIPDetailResponse> getVipDetail(@Body RequestBody Body);

    @POST(JDConstant.HOST + JDConstant.BASE_URL + JDConstant.METHOD_GET_NOTIFT)
    Observable<MessageNotifyResponse> getNotify(@Body RequestBody Body);

    @POST(JDConstant.HOST + JDConstant.BASE_URL + JDConstant.METHOD_REFUND)
    Observable<BaseResponse> refund(@Body RequestBody Body);

    @POST(JDConstant.HOST + JDConstant.BASE_URL + JDConstant.METHOD_EARNING_DATE_BY_MOUTH)
    Observable<EarningResponse> getEarning(@Body RequestBody Body);

    @POST(JDConstant.HOST + JDConstant.BASE_URL + JDConstant.METHOD_GET_BANKCARD_INFO)
    Observable<BankCardResponse> getBankCardInfo(@Body RequestBody Body);

    @POST(JDConstant.HOST + JDConstant.BASE_URL + JDConstant.METHOD_DEL_BANKCARD)
    Observable<BaseResponse> delBankCard(@Body RequestBody Body);


    @POST(JDConstant.HOST + JDConstant.BASE_URL + JDConstant.METHOD_ADD_BANK_CARD)
    Observable<BaseResponse> addBankCard(@Body RequestBody Body);

    @POST(JDConstant.HOST + JDConstant.BASE_URL + JDConstant.METHOD_UPDATE_BANK_CARD)
    Observable<BaseResponse> updateBankCard(@Body RequestBody Body);

    @POST(JDConstant.HOST + JDConstant.BASE_URL + JDConstant.METHOD_GET_BANK)
    Observable<BankResponse> getBank(@Body RequestBody Body);

    @GET(JDConstant.METHOD_WX_GET_TOKEN)
    Observable<WXTokenResponse> getWXToken(@Query("appid") String appid,
                                           @Query("secret") String secret,
                                           @Query("code") String code,
                                           @Query("grant_type") String grant_type);


    @GET(JDConstant.METHOD_WX_GET_USER_INFO)
    Observable<WXTokenResponse> getWXInfo(@Query("access_token") String access_token,
                                           @Query("openid") String openid);

    @POST(JDConstant.HOST + JDConstant.BASE_URL + JDConstant.METHOD_WX_LOGIN)
    Observable<LoginResponse> wxLogin(@Body RequestBody Body);

    @POST(JDConstant.HOST + JDConstant.BASE_URL + JDConstant.METHOD_GET_VIP_BALANCE)
    Observable<VIPBalanceResponse> getVipBalance(@Body RequestBody Body);

    @POST(JDConstant.HOST + JDConstant.BASE_URL + JDConstant.MEHTOD_GET_SHARE_HTML)
    Observable<BaseResponse> getHTML(@Body RequestBody Body);

    @POST(JDConstant.HOST + JDConstant.BASE_URL + JDConstant.METHOD_GET_SON_MEMBER)
    Observable<MemberResponse> getSonMember(@Body RequestBody Body);

    @POST(JDConstant.HOST + JDConstant.BASE_URL + JDConstant.METHOD_GET_GRANDSON_MEMBER)
    Observable<MemberResponse> getGrandson(@Body RequestBody Body);

    @POST(JDConstant.HOST + JDConstant.BASE_URL + JDConstant.METHOD_GET_EXPRESS_PRICE)
    Observable<ExpressPriceResponse> getExpressPrice(@Body RequestBody Body);

    @POST(JDConstant.HOST + JDConstant.BASE_URL + JDConstant.METHOD_GET_ALIPAY_URL)
    Observable<ExpressPriceResponse> getAliPayUrl(@Body RequestBody Body);

    @POST(JDConstant.HOST + JDConstant.BASE_URL + JDConstant.METHOD_GET_WECHAT_URL)
    Observable<ExpressPriceResponse> getWeChatUrl(@Body RequestBody Body);

    @POST(JDConstant.HOST + JDConstant.BASE_URL + JDConstant.  METHOD_CANCEL_ORDER)
    Observable<BaseResponse> cancelOrder(@Body RequestBody Body);



    @POST(JDConstant.HOST + JDConstant.BASE_URL + JDConstant.  METHOD_SHOUYI_DETAIL)
    Observable<ShouyiResponse> getShouyiDetail(@Body RequestBody Body);



    @POST(JDConstant.HOST + JDConstant.BASE_URL + JDConstant.METHOD_EXPRESS_DETAIL)
    Observable<ExpressResponse> getExpressDetail(@Body RequestBody Body);


    @POST(JDConstant.HOST + JDConstant.BASE_URL + JDConstant.METHOD_KEFU)
    Observable<KeFuResponse> getKeFu(@Body RequestBody Body);

    @POST(JDConstant.HOST + JDConstant.BASE_URL + JDConstant.METHOD_GET_CONFIG_LIST)
    Observable<ConfigResponse> getConfigList(@Body RequestBody Body);

    @POST(JDConstant.HOST + JDConstant.BASE_URL + JDConstant.METHOD_GET_GOODS_TAB)
    Observable<GoodsTabResponse> getGoodsTab(@Body RequestBody Body);



    @POST(JDConstant.HOST + JDConstant.BASE_URL + JDConstant.METHOD_GET_ALIPLY)
    Observable<GoodsTabResponse> getAlipay(@Body RequestBody Body);

    @POST(JDConstant.HOST + JDConstant.BASE_URL + JDConstant.METHOD_GET_WECHATPAY)
    Observable<WeChatPayResponse> getWechatPay(@Body RequestBody Body);

    @POST(JDConstant.HOST + JDConstant.BASE_URL + JDConstant.METHOD_GET_VIP)
    Observable<VipGradeResponse> getVip(@Body RequestBody Body);
}

